<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ page import="com.genghis.ptas.security.entity.User" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>平台用户界面</title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <%@include file="includes/common.jsp" %>
    <link rel="stylesheet" type="text/css"  href="<c:url value="/js/css/spigPet.css"/>"/>
    <link rel="stylesheet" type="text/css" href="<c:url value="/js/css/jquery.tmailsilder.v2.css"/> "/>
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
    <link href="assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css"/>
    <link href="assets/admin/pages/css/portfolio.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/css/components.css" rel="stylesheet" type="text/css"/>
    <link href="assets/global/css/plugins.css" rel="stylesheet" type="text/css"/>
    <link href="assets/admin/layout/css/layout.css" rel="stylesheet" type="text/css"/>
    <link id="style_color" href="assets/admin/layout/css/themes/default.css" rel="stylesheet" type="text/css"/>
    <link href="assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css"/>
    <link rel="shortcut icon" href="favicon.ico"/>

    <%
        User user = (User)session.getAttribute("user");
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
</head>
<body class="corporate">
<div class="pre-header">
    <div class="container">
        <div class="row">
            <div class="col-md-6 col-sm-6 additional-nav" style="float: right;">
                <ul class="list-unstyled list-inline pull-right">
                    <li class="langs-block">
                        <a href="javascript:void(0);" class="current">中文<i class="fa fa-angle-down"></i></a>
                        <div class="langs-block-others-wrapper"><div class="langs-block-others">
                        <a href="javascript:void(0);">English</a>
                        </div></div>
                    </li>
                    <li><%=user.getLoginName()%></li>
                    <li><a onclick="location.href='logout'">退出</a></li>
                </ul>
            </div>
        </div>
   </div>
</div>
<%@include file="includes/menu2.jsp" %>
<div class="main">
    <div class="container">
        <div class="row" style="margin-left: 0;">
            <div class="row" style="float: left; width: 75%; margin-left: 0">
                <div class="allcategorys">
                    <div class="classify" style="margin-right: 0px;"><ul class="sublist" id="typeUl"></ul></div>
                    <div class="tabbable tabbable-custom boxless" style="margin-left:12px;border:2px;">
                        <ul class="nav nav-tabs" style="display: none;">
                            <li><a href="#tab_2" data-toggle="tab">Columns</a></li>
                        </ul>
                        <div class="tab-pane active filter-v1 tab-content" id="tab_2">
                            <ul class="mix-filter">
                                <li class="filter" data-filter="category_1"> 最新上传</li>
                                <li class="filter" data-filter="category_2"> 浏览量排行</li>
                                <li class="filter" data-filter="category_3"> 评分排行</li>
                            </ul>
                            <div class="row mix-grid thumbnails">
                                <c:forEach items="${scormInfoList}" var="scorm">
                                    <div class="col-md-4 col-sm-6 ranking mix category_2" style="display: block; opacity: 1; width: 275px;">
                                        <div class="mix-inner">
                                            <div class="img-responsive" style=" margin-left: 10px;float: left;">
                                                <table  style="width: 200px;height: 220px">
                                                    <tr>
                                                        <td width="70px">书名:</td>
                                                        <td >${scorm.scormName}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">分数:</td>
                                                        <td >${scorm.commentScore}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">类别:</td>
                                                        <td >${scorm.showCourseType}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">描述:</td>
                                                        <td >${scorm.courseDisc}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">上传者:</td>
                                                        <td >${scorm.uploadUser}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">上传时间:</td>
                                                        <td >${scorm.uploadTime}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">注册量:</td>
                                                        <td >${scorm.registNum} </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">操作:</td>
                                                        <td >
                                                            <input type="button"  class="btn btn-primary" onclick="regStudy(${scorm.id})" value="注册学习"/></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </c:forEach>
                                <c:forEach items="${scormInfoList}" var="scorm">
                                    <div class="col-md-4 col-sm-6 ranking mix category_3" style="display: block; opacity: 1; width: 275px;">
                                        <div class="mix-inner">
                                            <div class="img-responsive" style="margin-left: 10px;vertical-align: top;float: left;">
                                                <table  style="width: 200px;height: 220px">
                                                    <tr>
                                                        <td width="70px">书名:</td>
                                                        <td >${scorm.scormName}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">分数:</td>
                                                        <td >${scorm.commentScore}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">类别:</td>
                                                        <td >${scorm.showCourseType}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">描述:</td>
                                                        <td >${scorm.courseDisc}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">上传者:</td>
                                                        <td >${scorm.uploadUser}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">上传时间:</td>
                                                        <td >${scorm.uploadTime}</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">注册量:</td>
                                                        <td >${scorm.registNum} </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="70px">操作:</td>
                                                        <td >
                                                            <input type="button"  class="btn btn-primary" onclick="regStudy(${scorm.id})" value="注册学习"/></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </c:forEach>
                                <c:forEach items="${scormInfoList}" var="scorm">
                                <div class="col-md-4 col-sm-6 ranking mix category_1" style="display: block; opacity: 1; width: 275px;">
                                    <div class="mix-inner">
                                        <div class="img-responsive" style="margin-left: 10px;vertical-align: top;float: left;">
                                            <table  style="width: 200px;height: 220px">
                                                <tr>
                                                    <td width="70px">书名:</td>
                                                    <td >${scorm.scormName}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">分数:</td>
                                                    <td >${scorm.commentScore}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">类别:</td>
                                                    <td >${scorm.showCourseType}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">描述:</td>
                                                    <td >${scorm.courseDisc}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">上传者:</td>
                                                    <td >${scorm.uploadUser}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">上传时间:</td>
                                                    <td >${scorm.uploadTime}</td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">注册量:</td>
                                                    <td >${scorm.registNum} </td>
                                                </tr>
                                                <tr>
                                                    <td width="70px">操作:</td>
                                                    <td >
                                                        <input type="button"  class="btn btn-primary" onclick="regStudy(${scorm.id})" value="注册学习"/></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </c:forEach>
                            </div>
                        </div>
                    </div>
                    <!--小人只在首页显示 start*-->
                    <div id="spig" class="spig">
                        <div id="message">正在加载中……</div>
                        <div id="mumu" class="mumu"></div>
                    </div>
                    <!--小人end*-->
                </div>
            </div>
            <div class="row" style="float: left; width: 25%; margin-left: 0">
                <a href="tourist/calendar">日历</a>
            </div>
        </div>
    </div>
    <div id="dataEdit" closed="true" modal="true" style="overflow: hidden">
        <iframe style="width: 100%;height: 100%" id="contentFrame" name="contentFrame" marginheight="0" marginwidth="0"
                frameborder="0" src="" allowTransparency="true"></iframe>
    </div>
    </div>
</div>
<div class="pre-footer" style="height: 40px;background: #fed4c8;">
    <div class="container" style="padding-top: 0px;">
        <div class="row">
        <div style="font-size:24px;text-align: center;">
            Exceeding  Kowledge
        </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    $(function () {
        browserSizeDeal();
        var sizeTimer;
        $(window).bind("resize", function () {
            sizeTimer != undefined && sizeTimer != null && clearTimeout(sizeTimer);
            sizeTimer = setTimeout("browserSizeDeal()", 100);
        });
    });

    function browserSizeDeal() {
        $('#mainDiv').height(document.documentElement.clientHeight - 143);
    }

    function initTab() {
        $('#tabDiv').tabs({
            fit: true,
            border: true
        });
    }

    function addTab(title,src) {
        initTab();
        var contents = '<iframe frameborder="no" id="ifrm" style="width:100%;height:100%;overflow:auto;" src="' + src + '"></iframe>';
        document.getElementById("tabDiv").innerHTML = contents;
    }

    var isindex = true;
    var visitor = "于潼";
    var dateConf = {
        language: 'zh-CN',
        startDate:'1914-1-1',
        endDate: new Date(),
        weekStart: 1,
        todayBtn: true,
        autoClose: true,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    };
    function getBirthday(){
        $("#birthday").datetimepicker(dateConf)
                .on('changeDate', function () {
                    $("#birthday").datetimepicker("hide");
                });
        autoComplete();
        JC.inputInit();
    }

    function regStudy(id){
        $.ajax({
            url: basePath+"scormZip/listAllCourseDo?id="+id,
            dataType: "json",
            type: "GET",
            success: function (flag) {
                if(flag==false){
                    $.messager.alert("提示","您已经注册过了！")
                }else{
                    $.messager.alert("提示","注册成功！跳转到学习界面！","",function (){
                        window.location.href= basePath+"scormZip/playScorm?id="+id;
                    })
                }
            },
            error: doError
        })
    }
    $(function(){
        $.ajax({
            url: basePath + "tourist/sortDo",
            dataType: "json",
            type: "POST",
            success: function (courseType){
                for(var i=0;i<courseType.length;i++){
                    $("#typeUl").append("<li><h5 class='mcate-item-hd' style='text-align: center'><span>"+courseType[i]+"</span></h5></li>");
                }
            },
            error: doError
        })
//       location.href=basePath+"tourist/listAllScormInfo";
    });
    function upFile() {
        $("#contentFrame")[0].contentWindow.document.write("");
        $("#contentFrame").attr("src", basePath + "consumer/upFileDo");
        $('#dataEdit').dialog({
            title: '上传课件',
            height: 400,
            width: 600
        })
        $('#dataEdit').dialog('open');
    }
</script>
<!-- END FOOTER -->
<!--[if lt IE 9]>
<script src="assets/global/plugins/respond.min.js"></script>
<script src="assets/global/plugins/excanvas.min.js"></script>
<![endif]-->
<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/frontend/layout/scripts/back-to-top.js" type="text/javascript"></script>
<script src="assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-mixitup/jquery.mixitup.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/fancybox/source/jquery.fancybox.pack.js" type="text/javascript"></script>
<script src="assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="assets/admin/layout/scripts/layout.js" type="text/javascript"></script>
<script src="assets/admin/pages/scripts/portfolio.js"></script>
<script>
jQuery(document).ready(function() {
   Metronic.init(); // init metronic core components
   Layout.init(); // init current layout
   Portfolio.init();
});
</script>